import java.util.Scanner;

public class HomeWork3 {
    public static void main(String[] args) {
        int[] array = {-9, 13, -5, 7, 8, 2, 12};
        Scanner num = new Scanner(System.in);
        int number = num.nextInt();
        int flag = 0;
        int len = array.length;
        for (int i = 0; i < len; i++) {
            if (number == array[i]) {
                flag = i;
                break;
            }
        }
        for (int i = flag; i < len - 1; i++) {
            array[i] = array[i + 1];
        }
        for (int i = 0; i < array.length - 1; i++) {
            System.out.print(array[i] + " ");
        }
    }
}
